/*
* 生成通话套餐类
* */
package Question3;


public class CallPackage extends Package implements CallServer {
    private int callduraction; //通话时长(分钟)
    private int messagenum; //短信条数
    private double expenses; //每月资费

    public CallPackage() {}

    public CallPackage(int callduraction, int messagenum, double expenses) {
        setCallduraction(callduraction);
        setMessagenum(messagenum);
        setExpenses(expenses);
    }

    public int getCallduraction() {
        return callduraction;
    }

    public void setCallduraction(int callduraction) {
        this.callduraction = callduraction;
    }

    public int getMessagenum() {
        return messagenum;
    }

    public void setMessagenum(int messagenum) {
        this.messagenum = messagenum;
    }

    public double getExpenses() {
        return expenses;
    }

    public void setExpenses(double expenses) {
        this.expenses = expenses;
    }
    
    @Override
    public void show() {
        System.out.println("套餐每月资费：" + expenses + "包含通话时长：" + callduraction
                + "短信条数:" + messagenum);
    }

    @Override
    public void callServer(int callduraction, TypeEnum type) {
        System.out.println("卡类型为：" + type + "通话时长为：" + callduraction);
    }
    
}
